package Day017_缓冲流_转换流_序列化流_打印流.demo4_序列流.Test2_序列化;

/**
 * @author zhangyan
 * @date 2020/5/9 12:01
 */
public class Person implements java.io.Serializable{  // 实现 java.io.Serializable 接口
    String name;
    int age;


    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
